<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>C++ Tutorial: STL III - Iterators</title>
  <meta
 content="C++ Tutorial: STL III - Iterators"
 name="description" />
  <meta
 content="C++ Tutorial, STL III - Iterators, Input Iterators,
Output Iterators, Forward Iterators, Bidirectional Iterators, Random Access Iterators, Stream Iterators"
 name="keywords" />
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1" />
  <link type="text/css" rel="stylesheet" href="../images/bogostyleWidePre.css" />
</head>
<body>
<div id="page" align="center">
<div id="content" style="width: 800px;">
<div id="logo">
<div class="whitetitle" style="margin-top: 70px;">bogotobogo </div>
</div>
<div id="topheader">
<div class="headerbodytext" align="left"><br />
<strong>Bogotobogo</strong><br />
contact@bogotobogo.com </div>
<div class="smallgraytext" id="toplinks"><a href="../index.html">Home</a>
| <a href="../sitemap.html">Sitemap</a>
| <a href="../blog" target="_blank">Contact Us</a>
</div>
</div>
<div id="menu">
<div class="smallwhitetext" style="padding: 9px;" align="right"><a
 href="../index.html">Home</a>
| <a href="../about_us.html">About Us</a>
| <a href="../products.html">Products</a>
| <a href="../our_services.html">Our Services</a>
| <a href="../blog" target="_blank">Contact Us</a>
</div>
</div>
<div id="submenu">
<div class="smallgraytext" style="padding: 9px;" align="right">
<a href="../gif.html">Gif</a> 
|<a href="../java_applet.html">JavaApplet/Web Start</a>
| <a href="../flash.html">Flash</a>
| <a href="../shockwave.html">ShockWave</a>
| <a href="../svg.html">SVG</a>
| <a href="../iPhone.html">iPhone/iPad</a>
| <a href="../android.html">Android</a>
| <a href="../OnHTML5.html">HTML5</a>
| <a href="../Algorithms/algorithms.html">Algorithms</a>
| <a href="../News/NewsMain.html">News</a>
| <a href="../cplusplus/cpptut.html">C++</a>
| <a href="../Java/tutorial/on_java.html">Java</a>
| <a href="../php/phptut.html">PHP</a>
| <a href="../DesignPatterns/introduction.html">Design Patterns</a>
| <a href="../python/pytut.html">Python</a> 
| <a href="../CSharp/.netframework.html">C#</a>
| <a href="../forums.html">Forums</a> 
| <a href="../VisualBasicSQL/introduction.html">Visual Basic</a>
</div>
</div>

<div id="contenttext">

<!-- Use of this code assumes agreement with the Google Custom Search Terms of Service. -->
<!-- The terms of service are available at http://www.google.com/cse/docs/tos.html -->
<form name="cse" id="searchbox_demo" action="http://www.google.com/cse">
  <input type="hidden" name="cref" value="" />
  <input type="hidden" name="ie" value="utf-8" />
  <input type="hidden" name="hl" value="" />
  <input name="q" type="text" size="40" />
  <input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/cse/tools/onthefly?form=searchbox_demo&lang="></script>

<div id="bookmarkshare">
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=khhong7"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=khhong7"></script>
</div>
<br />
<br />
<br />
<br />
<div style="padding: 10px;"><span class="titletext">C++ Tutorial<br />Standard Template Library (STL) III - Iterators</span></div>
<img src="../images/cplusplus/cpp_logo.jpg" alt="cplusplus logo"/>

<div class="bodytext" style="padding: 12px;" align="justify"> 
<div class="subtitle_2nd" id="FullList">Full List of C++ Tutorials</div>
<ul>
   <li><a href="cpptut.html">C++ Home</a> </li>
   <li><a href="string.html">String</a> </li>
   <li><a href="constructor.html">Constructor</a> </li>
   <li><a href="operatoroverloading.html">Operator Overloading</a> </li>
   <li><a href="virtualfunctions.html">Virtual Functions</a></li>
   <li><a href="dynamic_cast.html">Dynamic Cast Operator</a></li>
   <li><a href="typecast.html">Type Cast Operators</a></li>
   <li><a href="autoptr.html">Class auto_ptr</a></li>   
   <li><a href="templates.html">Templates</a></li>
   <li><a href="references.html">References for Built-in Types</a></li>
   <li><a href="valuevsreference.html">Pass by Value vs. Pass by Reference</a></li>
   <li><a href="memoryallocation.html">Memory Allocation</a></li>
   <li><a href="friendclass.html">Friend Functions and Friend Classes</a></li>
   <li><a href="functors.html">Functors (Function Objects)</a></li>
   <li><a href="statics.html">Static Variables and Static Class Members</a></li>
   <li><a href="exceptions.html">Exceptions</a></li>
   <li><a href="pointers.html">Pointers</a></li>
   <li><a href="pointers2.html">Pointers II</a></li>
   <li><a href="pointers3.html">Pointers III</a></li>
   <li><a href="assembly.html">Taste of Assembly</a></li>
   <li><a href="smallprograms.html">Small Programs</a></li>
   <li><a href="linkedlist.html">Linked List Examples</a></li>
   <li><a href="binarytree.html">Binary Tree Example Code</a></li>
   <li><a href="stl.html">Standard Template Library (STL) I</a></li>
   <li><a href="stl2.html">Standard Template Library (STL) II - Maps</a></li>
   <li><a href="stl3_iterators.html">Standard Template Library (STL) III - Iterators</a></li>
   <li><a href="stl4_algorithms.html">Standard Template Library (STL) IV - Algorithms</a></li>
   <li><a href="slicing.html">Object Slicing and Virtual Table</a></li>
   <li><a href="this_pointer.html">The this Pointer</a></li>
   <li><a href="stackunwinding.html">Stack Unwinding</a></li>
   <li><a href="upcasting_downcasting.html">Upcasting and Downcasting</a></li>
   <li><a href="object_returning.html">Object Returning</a></li>
   <li><a href="private_inheritance.html">Private Inheritance</a></li>
   <li><a href="cplusplus_keywords.html">C++_Keywords</a></li>
   <li><a href="multithreaded.html">Multi-Threaded Programming - Terminology</a></li>
   <li><a href="multithreaded2A.html">Multi-Threaded Programming II - Native Thread for Win32 (A) </a></li>
   <li><a href="multithreaded2B.html">Multi-Threaded Programming II -  Native Thread for Win32 (B) </a></li>
   <li><a href="multithreaded2C.html">Multi-Threaded Programming II -  Native Thread for Win32 (C) </a></li>
   <li><a href="multithreaded2.html">Multi-Threaded Programming II - C++ Thread for Win32</a></li>
   <li><a href="multithreaded3.html">Multi-Threaded Programming III - C++ Class Thread for Pthreads</a></li>
   <li><a href="multithreadedDebugging.html">Multithread Debugging</a></li>
   <li><a href="embeddedSystemsProgramming.html">Embedded Systems Programming</a></li>
   <li><a href="boost.html">Boost</a></li>
   <li>Programming Questions and Solutions
    <ul>
       <li><a href="quiz_strings_arrays.html">Strings and Arrays</a></li>
       <li><a href="quiz_linkedlist.html">Linked List</a></li>
       <li><a href="quiz_recursion.html">Recursion</a></li>
       <li><a href="quiz_bit_manipulation.html">Bit Manipulation</a> </li>
       <li><a href="google_interview_questions.html">140 Google Interview Questions</a> </li>
    </ul>
   </li>
</ul>
</div>

<br /><br />
<img src="images/stl3/YoungWalValley.png" alt="YoungWalValley"/>
<br /><br />
<br /><br />

<div class="bodytext" style="padding: 12px;" align="justify">
<div class="subtitle" id="iterators">Iterators</div>
<p>Iterators are used to step through the elements of collections of objects. 
The major advantage of iterators is that they offer common interfaces for any container type. 
Understanding iterators is probably the key to understand the STL. 
Just as templates make algorithm independent of the type of data stored, 
iterators make the algorithms <strong>independent</strong> of the type of <strong>container</strong> used. 
They are, therefore, an essential component of the STL generic approach.</p>

<br />
<img src="images/stl3/algorithms_independency.png" alt="algorithms_independency"/>
<br />
<p>Algorithms should be independent of the <strong>data structure</strong> of the 
<strong>container</strong> itself as well as <strong>data type</strong> stored in the container. 
<strong>Templates</strong> provide a generic representation for the data type stored in a container. 
The <strong>iterators</strong> provide a generic representation of the process of moving through the values in a 
container.</p>
<p>An iterator is an object that can navigate over elements of STL containers. 
All iterator represents a certain position in a container. 
To make it work, iterators have the following basic operations which are exactly 
the interface of ordinary pointers when they are used to iterator over the elements of an array.</p>
<ul>
	<li><strong>Operator *</strong> <br />
	Returns the element of the current position. </li>
	<li><strong>Operator ++</strong> <br />
	Lets the iterator step forward to the next element. Most iterators also allow backward stepping with operator --. </li>
	<li><strong>Operator == and !=</strong> <br />
	Check whether two iterators represent the same position. </li>
	<li><strong>Operator =</strong> <br />
	Assigns an iterator (the position of the element to which it refers.</li>
</ul>
<p>Though pointers also have the same properties listed above, there is a difference between pointer and iterators. The difference is that iterators may be <strong>smart pointers</strong> which can iterate over more complicated data structures of containers. The internal behavior of iterators depends on the data structure over which they iterate. So, each container type provides its own kind of iterator. In fact, each container class defines its iterator type as a nested class. As a result, iterators share the same interface but have different types.</p>
<p>All container classes provide the same basic member functions that enable them to use iterators to navigate their elements. The most important two functions are:</p>
<ul>
	<li><strong>begin()</strong> <br />
	This returns iterator that represents the beginning of the elements in the container. The beginning is the position of the first element. </li>
	<li><strong>end()</strong> <br />
	This returns an iterator that represents the end of the elements in the container. The end is the position <strong>behind</strong> the last element. This is also called a <strong>past-the-end iterator</strong>.</li>
</ul>
<p><strong>begin()</strong> and <strong>end()</strong> define a <strong>half-open range</strong> that includes the first element but exclude the last: [begin(),end()). A half-open range has two advantages:</p>
<ol>
	<li>We have a simple end criterion for loops that iterate over the elements: They simply march through until they meet <strong>end()</strong>.</li>
	<li>It avoids special handling for empty ranges. For empty ranges, <strong>begin</strong> is equal to <strong>end()</strong>.</li>
</ol>
<br />
<br />
<div class="subtitle" id="fiveIters">Five Iterators</div>
<p>Different algorithms have different requirements for iterators. 
A <strong>find()</strong> algorithm needs the ++ operator to be defined so 
the iterator can step through the container. It does not need write access but it needs read access. </p>
<pre>
template&lt;class InputIterator, class T&gt;
InputIterator find(InputIterator first, InputIterator last, const T& value);
</pre>
<p>
The <strong>sort()</strong> algorithm, on the other hand, requires random access 
so that it can swap the two non-adjacent elements.</p>
<pre>
template&lt;class RandomAccessIterator&gt;
void sort(RandomAccessIterator first, RandomAccessIterator last);
</pre>
<p>The STL defines five iterators and describes its algorithms in terms of which kinds of iterator it needs.</p>
<ul>
	<li><p><strong>Input Iterators</strong> <br />
	The term <strong>input</strong> is used from the viewpoint of a program. 
In other words, information going from the container to the program is considered input. 
So, an <strong>input iterator</strong> is one that a program can use to read values from a container. 
Dereferencing an input iterator allows us to read a value from a container, 
but it does not allow us to alter the value. So algorithms that require an input iterator are 
algorithms that don't modify values of the container elements.</p>
	<p>One-way iterator. It can increment, but it can't back up.</p>
	</li>
	<li><p><strong>Output Iterators</strong> <br />
	The term <strong>output</strong> indicates that the iterator is used for moving information 
from a program to a container. An output iterator is similar to an input iterator, 
except that dereferencing is guaranteed to allow a program to modify a value of container element 
but not to read it.</p>
	<p>Single-pass and write-only iterator.</p>
	</li>
	<li><p><strong>Forward Iterators</strong> <br />
	Forward iterators use only the ++ operators for navigating through a container. 
So a forward iterator can only go forward through a container one element at a time. 
Unlike input and output iterators, however, it necessarily goes through a sequence of values 
in the same order each time we use it.</p>
	<p>Multiple-pass iterator.</p>
	</li>
	<li><p><strong>Bidirectional Iterators</strong> <br />
	A bidirectional iterator has all the features of a forward iterator and adds support 
for the two decrement operators (prefix and postfix).</p>
	</li>
	<li><p><strong>Random Access Iterators</strong> <br />
	Some of the algorithms such as sort() and binary search() 
require the ability to jump directly to an arbitrary element of a container. 
This type of iterator has all the features of a bidirectional iterator, 
plus it adds operations such as pointer addition that support random access 
and relational operations for those of a bidirectional iterators.</p>
	</li>
</ul>
<br />
<br />


<div class="subtitle_2nd" id="iteratorsexample">Iterators - Example</div>
<p>Here is an example demonstrate the usage of iterators across  several containers.</p>
<pre>
#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;deque&gt;
#include &lt;list&gt;
#include &lt;set&gt;
#include &lt;map&gt;
#include &lt;string&gt;

using namespace std;

int main()
{
	set&lt;int&gt; col_set;
	set&lt;int, greater&lt;int&gt; &gt; col_set2;
	multiset&lt;int&gt; col_mset;
	multimap&lt;int,string&gt; col_mmap;
	map&lt;string,float&gt; col_sfmap;
	vector&lt;int&gt; col_vec;
	deque&lt;float&gt; col_deque;
	list&lt;char&gt; col_list;

	col_set.insert(3);
	col_set.insert(1);
	col_set.insert(5);
	col_set.insert(4);
	col_set.insert(1);
	col_set.insert(6);
	col_set.insert(2);

	set&lt;int&gt;::const_iterator pos_set;
	cout << "sets in ascending order ";
	for(pos_set = col_set.begin(); pos_set != col_set.end();++pos_set) {
		cout << *pos_set << ' ';
	}
	cout << endl;

	col_set2.insert(3);
	col_set2.insert(1);
	col_set2.insert(5);
	col_set2.insert(4);
	col_set2.insert(1);
	col_set2.insert(6);
	col_set2.insert(2);

	set&lt;int,greater&lt;int&gt; &gt;::const_iterator pos_set2;
	cout << "sets in descending order ";
	for(pos_set2 = col_set2.begin(); pos_set2 != col_set2.end();++pos_set2) {
		cout << *pos_set2 << ' ';
	}
	cout << endl;

	col_mset.insert(3);
	col_mset.insert(1);
	col_mset.insert(5);
	col_mset.insert(4);
	col_mset.insert(1);
	col_mset.insert(6);
	col_mset.insert(2);

	multiset&lt;int&gt;::const_iterator pos_mset;
	cout << "multi sets in ascending order " << endl;
	for(pos_mset=col_mset.begin();pos_mset!=col_mset.end();++pos_mset) {
		cout << *pos_mset << ' ';
	}
	cout << endl;

	col_mmap.insert(make_pair(5,"tagged"));
	col_mmap.insert(make_pair(2,"a"));
	col_mmap.insert(make_pair(1,"this"));
	col_mmap.insert(make_pair(4,"of"));
	col_mmap.insert(make_pair(6,"strings"));
	col_mmap.insert(make_pair(1,"is"));
	col_mmap.insert(make_pair(3,"map"));

	multimap&lt;int,string&gt;::const_iterator pos_mmap;
	cout << "multi maps in ascending order " << endl;
	for(pos_mmap=col_mmap.begin(); pos_mmap != col_mmap.end();++pos_mmap) {
		cout <<"(" <<pos_mmap->first<<"," << pos_mmap->second<< ")";				 
	}
	cout << endl;

	cout << "Associate Array: an array in which the index \n" <<
		    "may be of an arbitrary type \n" <<
		     "string-float map" << endl;
	col_sfmap["PI"] = 3.1415;
	col_sfmap["an arbitrary number"] = 4983.223;
	col_sfmap["Null"] = 0;

	map&lt;string,float&gt;::iterator pos_sfmap;
	for(pos_sfmap = col_sfmap.begin(); pos_sfmap != col_sfmap.end();++pos_sfmap) {
		cout << "key: \"" << pos_sfmap->first << "\" "
			<< "value: " << pos_sfmap->second << endl;
	}

	cout << "vector, list & deque";
	for (int i = 1;i <= 6; i++) {
		col_vec.push_back(i);
		col_deque.push_front(static_cast&lt;double&gt;(i)*1.1);
	}

	for(char c = 'a';c <= 'z'; ++c) {
		col_list.push_back(c);
	}

	for (int i=0; i < col_vec.size() ; i++) {
		cout << col_vec[i] <<' ';
	}
	cout << endl;
	for (int i = 0; i < col_deque.size() ; i++) {
		cout << col_deque[i] <<' ';
	}
	cout << endl;

	//constant version iterator (read only)
	cout << " using constant iterator \n";
	list&lt;char&gt;:: const_iterator pos;
	for(pos = col_list.begin();pos!=col_list.end();pos++) {
		cout << *pos << ' ';
	}
	cout << endl;

	//non-constant version iterator (read and write)
	cout << " using non_constant iterator \n";
	list&lt;char&gt;:: iterator ncpos;
	// note that the preincrement operator(prefix ++) is used here.
	// postincrement(++) is slower because it should return
	// the old position.
	for(ncpos = col_list.begin(); ncpos != col_list.end(); ++ncpos) {
		*ncpos = toupper(*ncpos);
		cout << *ncpos << ' ';
	}
	cout << endl;

	cout << " list output using while \n";
	while(!col_list.empty()) {
		cout << col_list.front() << ' ';
		col_list.pop_front();
	}
	cout << endl;

	return 0;
}
</pre> 
<p>The output is: </p>
<pre>
sets in ascending order 1 2 3 4 5 6
sets in descending order 6 5 4 3 2 1
multi sets in ascending order
1 1 2 3 4 5 6
multi maps in ascending order
(1,this)(1,is)(2,a)(3,map)(4,of)(5,tagged)(6,strings)
Associate Array: an array in which the index
may be of an arbitrary type
string-float map
key: "Null" value: 0
key: "PI" value: 3.1415
key: "an arbitrary number" value: 4983.22
vector, list & deque1 2 3 4 5 6
6.6 5.5 4.4 3.3 2.2 1.1
 using constant iterator
a b c d e f g h i j k l m n o p q r s t u v w x y z
 using non_constant iterator
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
 list output using while
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
</pre>
<br />
<br />


<div class="subtitle" id="copy_algorithm">copy() algorithm with ostream_iterator and istream_iterator</div>
<p>STL's <strong>copy()</strong> function copies elements from a range to a location identified by an iterator:</p>
<pre>
template&lt;class InputIterator, class OutputIterator&gt;
OutputIterator copy(InputIterator first,	// beginning of source
			InputIterator last, 	// end of source
			OutputIterator result)	// beginning of destination
{
	while (first != last) {
		*result = *first;
		++first;
		++result;
	}
	return result;
);
</pre>
<p>The <strong>copy()</strong> function copies the elements in the range <strong>[first,last)</strong> into the 
range <strong>[result, result + (lat - first))</strong>. 
It returns an iterator pointing one past the last copied-to location, 
<strong>result + (last - first)</strong>. The <strong>result</strong> should not be in the range <strong>[first, last)</strong>.
In other words, the target can't overlap the source.</p>
<p>The <strong>copy()</strong> algorithm can copy data from one container to another. For example, it can copy an array into a vector:</p>
<pre>
#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;algorithm&gt;
using namespace std;

int main()
{
	int myInt[] = {1,2,3,4,5};
	vector&lt;int&gt; v(sizeof(myInt)/sizeof(int));

	// copy array to vector
	<font color="red">copy(myInt, myInt+5, v.begin());</font>

	//display elements
	vector&lt;int&gt;::const_iterator it;
	for(it = v.begin(); it != v.end(); ++it) {
		cout << *it << " " ;
	}

	return 0;
}
</pre>
<p>The <strong>copy()</strong> function overwrites existing data in the destination container. So, 
the container should be large enough to hold the copied elements. As a result, we can't simply 
use <strong>copy()</strong> to put data in an empty vector. </p>
<p>In the example, we displayed the elements after we copied the elements. 
If there is an iterator representing the output stream, we can use it with <strong>copy()</strong>.
STL provides us such an iterator with the <strong>ostream_iterator</strong> template. It is an <strong>adapter</strong> 
, which is a class or function that converts an interface to another interface.. The following lines are doing 
exactly that:</p>
<pre>
#include &lt;iterator&gt;
ostream_iterator&lt;int, char&gt; myOutputIterator(cout, " ");
</pre>
<p>The <strong>myOutputIterator</strong> iterator now becomes an interface that allows us to use <strong>cout</strong> 
for display. The first template argument, <strong>int</strong>, indicates the data type being sent to the output stream.
The second template argument, <strong>char</strong>, indicates that the output stream uses character type. 
The <strong>cout</strong> which is the first constructor argument identifies the output steam being used. The 
character string argument is a separator to be displayed after each item sent to the output stream.</p>
<p>We could use the iterator something like this:</p>
<pre>
*myOutputIterator++ = 2012;
</pre>
<p>It works like:</p>
<pre>
cout << 2012 << " ";
</pre>
<p>This <strong>ostream_iterator</strong>, the line says send <strong>2012</strong> and then a string " " to the 
output stream controlled by <strong>cout</strong>. With <strong>copy()</strong>, we can use the iterator like this:</p>
<pre>
copy(v.begin(), v.end(), myOutputIterator);
</pre>
<p>This copies the entire <strong>v</strong> container to the output stream. In other words, it displays the all 
the contents of the <strong>v</strong>:</p>
<pre>
include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;algorithm&gt;
<font color="red">#include &lt;iterator&gt;</font>
using namespace std;

int main()
{
	int myInt[] = {1,2,3,4,5};
	vector&lt;int&gt; v(sizeof(myInt)/sizeof(int));

	// copy array to vector
	copy(myInt, myInt+5, v.begin());

	// display elements
	<font color="red">ostream_iterator&lt;int, char&gt; myOutputIterator(cout, " ");
	copy(v.begin(), v.end(), myOutputIterator);</font>

	return 0;
}
</pre>
<p>Actually, we do not need named iterator, <strong>myOutputIterator</strong>, 
for our display, and use an anonymous iterator:</p>
<pre>
copy(v.begin(), v.end(), ostream_iterator<int,char>(cout," "));
</pre>
<p>Instead of </p>
<pre>
// display elements
ostream_iterator&lt;int, char&gt; myOutputIterator(cout, " ");
copy(v.begin(), v.end(), myOutputIterator);
</pre>
<br /><br />
<img src="images/stl3/SeorakSan.png" alt="SeorakSan"/>
<br /><br />


<br /><br />
<div class="subtitle_2nd" id="FullList">Full List of C++ Tutorials</div>
<ul>
   <li><a href="cpptut.html">C++ Home</a> </li>
   <li><a href="string.html">String</a> </li>
   <li><a href="constructor.html">Constructor</a> </li>
   <li><a href="operatoroverloading.html">Operator Overloading</a> </li>
   <li><a href="virtualfunctions.html">Virtual Functions</a></li>
   <li><a href="dynamic_cast.html">Dynamic Cast Operator</a></li>
   <li><a href="typecast.html">Type Cast Operators</a></li>
   <li><a href="autoptr.html">Class auto_ptr</a></li>
   <li><a href="templates.html">Templates</a></li>
   <li><a href="references.html">References for Built-in Types</a></li>
   <li><a href="valuevsreference.html">Pass by Value vs. Pass by Reference</a></li>
   <li><a href="memoryallocation.html">Memory Allocation</a></li>
   <li><a href="friendclass.html">Friend Functions and Friend Classes</a></li>
   <li><a href="functors.html">Functors</a></li>
   <li><a href="statics.html">Static Variables and Static Class Members</a></li>
   <li><a href="exceptions.html">Exceptions</a></li>
   <li><a href="pointers.html">Pointers</a></li>
   <li><a href="pointers2.html">Pointers II</a></li>
   <li><a href="pointers3.html">Pointers III</a></li>
   <li><a href="assembly.html">Taste of Assembly</a></li>
   <li><a href="smallprograms.html">Small Programs</a></li>
   <li><a href="linkedlist.html">Linked List Examples</a></li>
   <li><a href="binarytree.html">Binary Tree Example Code</a></li>
   <li><a href="stl.html">Standard Template Library (STL) I</a></li>
   <li><a href="stl2.html">Standard Template Library (STL) II - Maps</a></li>
   <li><a href="stl3_iterators.html">Standard Template Library (STL) III - Iterators</a></li>
   <li><a href="stl4_algorithms.html">Standard Template Library (STL) IV - Algorithms</a></li>
   <li><a href="slicing.html">Object Slicing and Virtual Table</a></li>
   <li><a href="this_pointer.html">The this Pointer</a></li>
   <li><a href="stackunwinding.html">Stack Unwinding</a></li>
   <li><a href="upcasting_downcasting.html">Upcasting and Downcasting</a></li>
   <li><a href="object_returning.html">Object Returning</a></li>
   <li><a href="private_inheritance.html">Private Inheritance</a></li>
   <li><a href="cplusplus_keywords.html">C++_Keywords</a></li>
   <li><a href="multithreaded.html">Multi-Threaded Programming - Terminology</a></li>
   <li><a href="multithreaded2A.html">Multi-Threaded Programming II - Native Thread for Win32 (A) </a></li>
   <li><a href="multithreaded2B.html">Multi-Threaded Programming II -  Native Thread for Win32 (B) </a></li>
   <li><a href="multithreaded2C.html">Multi-Threaded Programming II -  Native Thread for Win32 (C) </a></li>
   <li><a href="multithreaded2.html">Multi-Threaded Programming II - C++ Thread for Win32</a></li>
   <li><a href="multithreaded3.html">Multi-Threaded Programming III - C++ Class Thread for Pthreads</a></li>
   <li><a href="multithreadedDebugging.html">Multithread Debugging</a></li>
   <li><a href="embeddedSystemsProgramming.html">Embedded Systems Programming</a></li>
   <li><a href="boost.html">Boost</a></li>
   <li>Programming Questions and Solutions
    <ul>
       <li><a href="quiz_strings_arrays.html">Strings and Arrays</a></li>
       <li><a href="quiz_linkedlist.html">Linked List</a></li>
       <li><a href="quiz_recursion.html">Recursion</a></li>
       <li><a href="quiz_bit_manipulation.html">Bit Manipulation</a> </li>
       <li><a href="google_interview_questions.html">140 Google Interview Questions</a> </li>
    </ul>
   </li>

</ul>
<br /><br />


<br />


<br />
<br />
<br />


</div>
</div>
<div class="smallgraytext" id="footer"><a href="../index.html">Home</a>
| <a href="../about_us.html">About Us</a>
| <a href="../products.html">products</a>
| <a href="../our_services.html">Our Services</a>
| <a href="#">Contact Us</a>
| Bogotobogo &copy; 2011 | <a target="_blank" href="http://www.bogotobogo.com">Bogotobogo </a>
</div>
</div>
</div>
</body>
</html>
